package ro.pub.cs.dfsa.server.connection;

import java.io.IOException;

import ro.pub.cs.dfsa.client.connection.AbstractClientConnection;

public abstract class AbstractServerConnection {
    protected String serverAddress;
    protected int serverPort;
    protected int clientPort;
    
    public AbstractServerConnection() {
        
    }
    
    public abstract void createListener() throws IOException;
    public abstract AbstractClientConnection getClient() throws IOException;
    public abstract void close() throws IOException;
    
    public String getServerAddress() {
        return serverAddress;
    }

    public void setServerAddress(String serverAddress) {
        this.serverAddress = serverAddress;
    }

    public int getServerPort() {
        return serverPort;
    }

    public void setServerPort(int serverPort) {
        this.serverPort = serverPort;
    }
    
    public int getClientPort() {
        return clientPort;
    }

    public void setClientPort(int clientPort) {
        this.clientPort = clientPort;
    }
}

